﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Shanfree.SharpMovie.BLL;
using Shanfree.Framework.Utility;
using System.Diagnostics;

public partial class Admin_Login : BasePage
{
    protected override bool IsAuth
    {
        get
        {
            return base.IsAuth;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnComfirm_Click(object sender, EventArgs e)
    {
        try
        {
            string name = tbName.Text;
            string pwd = tbPwd.Text;

            bool login = this.Login(name, pwd);
            if (login == false)
            {
                ShowMsg("您输入的账号和密码不匹配。大写锁定是否开启？");
            }
            else
            {
                Response.Redirect("Main.aspx", false);
            }
        }
        catch (ArgumentNullException aEx)
        {
            ShowMsg(aEx.Message);
            return;
        }
        catch (Exception ex)
        {
            ShowMsg(ex.Message);
            LogEntry.Log.Write(ex.ToString(), EventLogEntryType.Error, LogSourceType.其他);
        }   
    }

}
